#!/bin/bash
# vim: set ft=sh

set -e

OUTPUT="$PWD/bosh-dev"

pushd concourse/
  # work-around Go BOSH CLI trying to rename blobs downloaded into ~/.root/tmp
  # into release dir, which is invalid cross-device link
  export HOME=$PWD

  version="0.0.0+dev.$(date +%s)"

  bosh -n create-release --name concourse --version "$version" --tarball "$OUTPUT/concourse-$version.tgz"
  echo "$version" > "$OUTPUT/version"
popd
